module.exports = function map(arr, fn) {
  const results = [];
  for (const [index, item] of arr.entries()) {
    results.push(fn(item, index, arr));
  }
  return results;
};
